<?php

namespace App\Http\Controllers\Topic\Categories;

use App\Http\Controllers\Controller;
use App\Models\Topic\Category;
use App\Models\Topic\Link;
use App\Models\User;
use TopicShow;
use Illuminate\Http\Request;
use App\Models\Topic\Topic;
class CategoriesController extends Controller
{
    public function show(Category $category, Request $request, Topic $topic,User $user, Link $link)
    {
        $topics = TopicShow::categories_show($category->id,$request->order,$topic);
        $active_users = $user->getActiveUsers();
        $links = $link->getAllCached();
        return view('topics.topic.index', compact('topics', 'category','active_users','links'));
    }
}
